Skip to content

Grade Aggregate Optimization and Websoc Grades - #546

Open
alexanderl19 wants to merge 3 commits into
mainfrom
grades-websoc-optimization
Open

alexanderl19 wants to merge 3 commits into
mainfrom
grades-websoc-optimization

Conversation

@alexanderl19

@alexanderl19 alexanderl19 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Description

Added materialize views for grade aggregate by course and course / prof pair. These are generated by the grades upload script.

Added the ability to request grade aggregates for course and offerings directly from the WebReg endpoint.

Related Issue

Motivation and Context

AntAlmanac heavily uses these endpoints and shows a use case for requesting these values while listing WebSoc results.

Embedding these values directly into the REST endpoint will reduce the number of request dramatically. Adding the materialized view for the base non filter case improved performance by roughly 22x (pg cpu time measured locally).

How Has This Been Tested?

Tested REST API endpoint locally with db dump. GraphQL optimizations and regression not tested.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code involves a change to the database schema.
  • My code requires a change to the documentation.

@laggycomputer laggycomputer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graphql

This branch was successfully deployed

1 active deployment
staging-546 — c8977b63 Deployed Nov 18, 2026 by HwijungK via Deploy API to staging #1537
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants